import Vue from 'vue'
import App from './App'
import httpRequest from './utils/httpRequest'
import api from './utils/api'
import store from './store'

Vue.config.productionTip = false

App.mpType = 'app'

//统一提示方便全局修改
const msg = (title, duration=1500, mask=false, icon='none')=>{
	if(Boolean(title) === false){
		return;
	}
	uni.showToast({
		title,
		duration,
		mask,
		icon
	});
}

// 挂载全局
Vue.prototype.$http = httpRequest;// ajax请求方法
Vue.prototype.$api = api;//请求api接口
Vue.prototype.$store = store
Vue.prototype.$msg = msg

const app = new Vue({
	store,
    ...App
})
app.$mount()
